package com.bkgy.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author
 * @version 1.0
 * @ClassName RegexUtlis
 * @date 2023/2/13 16:24
 */
public class RegexUtils {
    /**
     * 判断字符串是否为数字
     * @param str
     * @return
     */
    //判断字符串是不是以数字开头
    public static boolean isStartWithNumber(String str) {
        Pattern pattern = Pattern.compile("[0-9]*");
        Matcher isNum = pattern.matcher(str.charAt(0)+"");
        if (!isNum.matches()) {
            return false;
        }
        return true;
    }

}
